<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<c:set var="path" value="..${ctx}/base/power/authority"/>

<div class="pageContent">
	<form method="post" action="${path}/ajaxupdate.html" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
	<input type="hidden" name="tableName" value="bs_role" />
	<input type="hidden" name="table.id.name" value="roleID" />
	<input type="hidden" name="tableAction" value="save" />
	<input type="hidden" name="jspPageName" value="${path}/paging.html?tableName=bs_role&jsp=base/power/role/role_list" />
		<div class="pageFormContent" layoutH="70">
			<fieldset>
				<dl>
					<dt>属性编号：</dt>
					<dd><input name="authorityID" type="text" size="30" value="${data.authorityID}" readonly="readonly"/></dd>
				</dl>
				<dl>
					<dt>属性名称：</dt>
					<dd><input name="pageName" type="text" size="30" value="${data.pageName}" class="required" /></dd>
				</dl>
				<dl>
					<dt>属性描述：</dt>
					<dd><input name="description" type="text" size="60" value="${data.description}" /></dd>
				</dl>
				<dl>
					<dt>工作组隐藏权限：</dt>
					<dd><input name="hideGroup" type="text" size="60" value="${data.authorityPage.hideGroup}" /></dd>
				</dl>
				<dl>
					<dt>工作组可见权限：</dt>
					<dd><input name="visibleGroup" type="text" size="60" value="${data.authorityPage.visibleGroup}" /></dd>
				</dl>
				<dl>
					<dt>工作组编辑权限：</dt>
					<dd><input name="editable" type="text" size="60" value="${data.authorityPage.editable}" /></dd>
				</dl>
				<dl>
					<dt>角色隐藏权限：</dt>
					<input name="data.authorityPage.roleID" value="" type="hidden" id="visibleRole" />
					<input name="data.authorityPage.roleName" value="" type="text" size="80" readonly="readonly" />
					<a class="btnLook" href="..${ctx}/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list" width="500" lookupGroup="data.authorityPage">查找带回</a>

					<dd><input name="hideRole" type="text" size="60" value="${data.authorityPage.hideRole}" /></dd>
				</dl>
				<dl>
					<dt>角色可见权限：</dt>
					<input name="data.authorityPage.roleID" value="" type="hidden" id="visibleRole" />
					<input name="data.authorityPage.roleName" value="" type="text" size="80" readonly="readonly" />
					<a class="btnLook" href="..${ctx}/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list" width="500" lookupGroup="data.authorityPage">查找带回</a>

					<dd><input name="visibleRole" type="text" size="60" value="${data.authorityPage.visibleRole}" /></dd>
				</dl>
				<dl>
					<dt>角色编辑权限：</dt>
					<input name="data.authorityPage.roleID" value="" type="hidden" id="visibleRole" />
					<input name="data.authorityPage.roleName" value="" type="text" size="80" readonly="readonly" />
					<a class="btnLook" href="..${ctx}/common/table/list.html?tableName=bs_role&jsp=base/power/role/role_consult_list" width="500" lookupGroup="data.authorityPage">查找带回</a>

					<dd><input name="roleEditable" type="text" size="60" value="${data.authorityPage.roleEditable}" /></dd>
				</dl>
			</fieldset>
		</div>	

		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" >保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
/**
 * dialog上的表单提交回调函数
 * 服务器转回navTabId，可以重新载入指定的navTab. statusCode=DWZ.statusCode.ok表示操作成功, 自动关闭当前dialog
 * form提交后返回json数据结构,json格式和navTabAjaxDone一致
 */
function dialogAjaxDone(json){
	DWZ.ajaxDone(json);
	if (json.statusCode == DWZ.statusCode.ok){
		// alert(json.callbackType);
		if(json.callbackType){
			navTab.reload("${path}/tablenamepaginglist.html?tableName=bs_role&jspPageName=base/power/role/role_list");//刷新
			setTimeout(function(){$.pdialog.closeCurrent();}, 100);
		}
	}
}
</script>
